<%-- Created by IntelliJ IDEA. --%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
  <head>
    <title></title>
    <script src="js/jquery-1.12.4.js"></script>
    <script>
      $(function () {
        $("tr:odd").css("background-color","#FF3366");
      });
    </script>
  </head>
  <body>
      <button onclick="location.href='add.jsp'">添加预约</button>
      <table border="1">
          <tr>
            <td>预约人姓名</td>
            <td>预约人身份证</td>
            <td>接种状态</td>
            <td>预约接种日期</td>
            <td>操作</td>
          </tr>
        <c:forEach var="a" items="${list}">
          <tr>
            <td>${a.userName}</td>
            <td>${a.cardId}</td>
            <td>${a.status==0?"预约":"已接种"}</td>
            <td>${a.bookingDate}</td>
            <td>
              <a href="QueryServlet?&id=${a.id}">详细</a>
              <a href="" >完成接种</a>
              <a href="DeleteServlet?&id=${a.id}">删除</a>
            </td>
          </tr>
        </c:forEach>
      </table>
  <p>
    <a href="countServlet?action=page&pageNo=1&pageSize=2">首页</a>
    <c:if test="${param.pageNo>1}">
      <a href="countServlet?action = page&pageNo=${param.pageNo-1}&pageSize=2">上一页</a>
    </c:if>
    <c:if test="${param.pageNo<totaPage}">
      <a href="countServlet?action=page&pageNo = ${param.pageNo+1}&pageSize=2">下一页</a>
    </c:if>
    <a href="countServlet?action=page&PageNo=${totalPage}&pageSize=2">尾页</a>
  </p>
  </body>
</html>